﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using MediaBrowser.Library.Plugins;
using MediaBrowser.Library.Entities;
using MediaBrowser.Library.Logging;
using MediaBrowser;
using MediaBrowser.Library.Configuration;
using MediaBrowser.Library;

//******************************************************************************************************************
//  This class is the heart of your plug-in.  It is instantiated by the initial loading logic of MediaBrowser.
//
//  For your project to build you need to be sure the reference to the MediaBrowser assembly is current.  More than
//  likely, it is broken in this template as the template cannot copy binaries, plus it would probably be out of date
//  anyway.  Expand the References tree in the Solution Explorer to the right and make sure you have a good reference
//  to a current version of the mediabrowser.dll.
//
//  If you wish for your plug in needs to provide mcml or other resources to MediaBrowser (like a config panel)
//  You need to do the following:
//
//  For your project to load as a MediaBrowser Plug-in you need to build your release .dll and copy it to the ehome
//  directory (under your windows directory). AND ALSO create a .pgn file with the same name as your dll and put it
//  in c:\program data\mediabrowser\plugins.  The Configurator will do this automatically if provided a valid 
//  plugin_info.xml file and location for your .dll
//
//  If you don't need to provide any mcml or other resources you can load as a normal plugin and just place your release
//  .dll in c:\program data\mediabrowser\plugins.
//******************************************************************************************************************

namespace theHTPCPeopleProvider
{
    class Plugin : BasePlugin
    {
        public override void Init(Kernel kernel)
        {

            kernel.MetadataProviderFactories.Add(MetadataProviderFactory.Get<theHTPCPeopleProvider>());
            Logger.ReportInfo(Name + " (version " + Version + ") Loaded.");
        }

        public override string Name
        {
            get { return "IBN People Provider"; }
        }

        public override string Description
        {
            get { return "Downloads high quality cast and crew images from theHTPC.net's ImagesByName People Project."; }
        }
        //Only un-comment this if you have a rich description resource
        public override string RichDescURL
        {
        //    //You can return a fully-qualified URI to a resource that displays a rich description of your plugin here
            get { return "http://projects.thehtpc.net/ibn_plugin/index.html"; }
        }

        public override bool InstallGlobally
        {
            get
            {
                //this must return true if you want to pass references to our resources to MB (including a config page)
                //return true; //we need to be installed in a globally-accessible area (GAC, ehome)

                //return false if you don't need to pass resources
                return false;
            }
        }

        // Return the lowest version of MediaBrowser with which this plug-in is compatable
        public override System.Version RequiredMBVersion
        {
            get
            {
                return new System.Version(2, 2, 3, 0);
            }
        }

        // Return the highest version of MediaBrowser with which this plug-in has been tested
        public override System.Version TestedMBVersion
        {
            get
            {
                return new System.Version(2, 2, 6, 0);
            }
        }
        
    }
    
}